From 986c39db495bfee3cfa354f31031f6d473128ebb Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 13 Jun 2007 10:39:48 +0100 Subject: [PATCH] x86: ioapic_write() must check for weird redir entries with special delivery mode yet apparently valid vectoring information. Signed-off-by: Keir Fraser --- xen/arch/x86/io_apic.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index ebd177deb1..5aff60f52b 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2114,6 +2114,15 @@ int ioapic_guest_write(unsigned long physbase, unsigned int reg, u32 val) return 0; } + /* Special delivery modes (SMI,NMI,INIT,ExtInt) should have no vector. */ + if ( (old_rte.delivery_mode > dest_LowestPrio) && (old_rte.vector != 0) ) + { + WARN_BOGUS_WRITE("Special delivery mode %d with non-zero vector " + "%02x\n", old_rte.delivery_mode, old_rte.vector); + /* Nobble the vector here as it does not relate to a valid irq. */ + old_rte.vector = 0; + } + if ( old_rte.vector >= FIRST_DYNAMIC_VECTOR ) old_irq = vector_irq[old_rte.vector]; if ( new_rte.vector >= FIRST_DYNAMIC_VECTOR ) -- 2.30.2